if __name__ == '__main__':
    x = "fsd";
    print(type(x))
    print(type("fsdf"))
    print(type(3.12548))

    s = "2024"
    print(type(s), s)
    year = int(s)
    print(type(year), year)

    # 精度丢失
    num = int(float(3.56))

    print(num)

    print(9 / 2)
    print(9 // 2)
    print(9 % 2)

    name = "hello"
    n = 10
    sss = "nishi %s %s" % (name, n)
print(sss)

s1 = "%6.4f" % (56.889)
print(s1)
n = "%1d" % (111)
print(n)

age = 18
print(f"年龄{age}")
print(f"年龄{18}")
print("%.2f" % 56.666)

"""
name1 = input("请输入班级")
name2 = input("请输入年龄")

result = f"班级{name1}，年级{name2}"
print(result)
result = "班级%s，年级%s" % (name1, name2)
print(result)

"""

print(10 == 20)

age = 1
if age > 18:
    print("大学生")
elif age > 15:
    print("中学生")
else:
    print("小学生")

    num = 10;
"""
if int(input("请输入数字：")) == num:
        print("yes")
elif int(input("不对再猜一次：")) == num:
    print("yes")
else:
    print("no")
    
"""

"""
import random

n = random.randint(1, 100)
count = 0

flag = True

while flag:
    count = count + 1
    m = int(input("随机猜数字,请输入数字："))
    if n == m:
        print("猜对了")
        flag = False
    else:
        if n > m:
            print("小了")
        else:
            print("大了")

print(f"总共猜了{count}")
print("总共猜了%d" % count)

"""

print("Hello",end='')
print("World",end='')

print("Hello World")
print("Hello\tWorld")

"""   九九乘法表     """
print("====while实现 就九九乘法表====")
n=1
while n<=9:
    m=1;
    while m<=n:
        print(f"{m}*{n}={m * n}\t", end='')
        m=m+1;
    n=n+1
    print()

print("====for实现 就九九乘法表====")
n=1
for n in range(1,10):
    for m in range(1,n+1):
        print(f"{m}*{n}={m * n}\t", end='')
    print()



name="abcdefg"
for x in name:
    print(x+" ",end="")
print()

for x in range(1,100,5):
   print(x," ",end='')

print()

for x in range(1,5):
    print(x," ",end='')
    continue
    print("test")




